<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<div class="content-wrap">
        <div class="wrapper" style="bottom: 50px;">
            <ul class="nav nav-tabs">
                <li>
                    <a href="#"  onclick="loadDiv('mainCenterDiv','${ctx}/drug/drugNameDict/index')">药品名称字典</a>
                </li>
                <li class="active">
                    <a href="#" onclick="loadDiv('leftCenterDiv','${ctx}/drug/drugNameDict/form')">
                        <c:choose>
                            <c:when test="${drugNameDict.id==''|| drugNameDict.id==null}">
                                添加药品名称
                            </c:when>
                        </c:choose>
                    </a>
                </li>
            </ul>
            <section class="panel panel-default">
                <div class="panel-body">
                    <div class="col-lg-12">
                        <form:form id="inputForm" data-parsley-validate="" modelAttribute="drugNameDict" onsubmit="return formSaveLoad('mainCenterDiv','inputForm','${ctx}/drug/drugNameDict/save','${ctx}/drug/drugNameDict/index');" method="post" class="form-horizontal">
                            <form:hidden path="id"/>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">药品类别：</label>
                                    <div class="col-sm-6">
                                        <sys:treeselect selectedParent="true" id="drugType" name="drugType" value="${drugNameDict.drugType}"  update="${not empty drugNameDict.id}" labelName="drugType1" labelValue="${drugNameDict.drugType}"
                                                        title="药品类别" url="/drug/drugClassDict/treeData" extId="${drugNameDict.id}" cssClass="form-control" isnull="true" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">药品剂型：</label>
                                    <div class="col-sm-6">
                                        <form:select path="drugFrom" class="form-control" data-parsley-required="true">
                                            <form:option value="" label=""/>
                                            <form:options items="${fns:getDictList('DRUG_FORM_DICT')}" itemLabel="label" data-parsley-required="true" itemValue="value"  htmlEscape="false"/>
                                        </form:select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">药品名称：</label>
                                    <div class="col-sm-6">
                                        <form:input path="drugName" htmlEscape="false"  class="form-control" data-parsley-required="true"  maxlength="100" />
                                    </div>
                                </div>
                                <div class="form-group">
                                <label class="col-sm-4 control-label">药品属性：</label>
                                <div class="col-sm-6">
                                        <%--<form:input path="preciousFlag" htmlEscape="false" class="form-control"  maxlength="1" />--%>
                                    <form:select path="drugIndicator" class="form-control" data-parsley-required="true">
                                        <form:option value="" label="" />
                                        <form:options items="${fns:getDictList('DRUG_TYPE_DICT')}" itemLabel="label" data-parsley-required="true" itemValue="value" htmlEscape="false"/>
                                    </form:select>
                                </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-sm-offset-2 col-sm-10">
                                        <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存">&nbsp;
                                        <input id="btnCancel" class="btn" type="button" value="返 回" onclick="loadDiv('mainCenterDiv','${ctx}/drug/drugNameDict/index')">
                                </div>
                            </div>
                        </form:form>
                    </div>

                </div>
            </section>
        </div>
    </div>